﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SDT.Site.ViewModels;
using SDT.Lib.Common;
using SDT.Site.Properties;
using SDT.Model;

namespace SDT.Site.Controllers
{
    public class OnlineSupportController : Controller
    {
        //
        // GET: /OnlineSupport/
        [ChildActionOnly]
        public ActionResult GetSupport()
        {
            SDTDataContext db=new SDTDataContext();
            SupportViewModel s = new SupportViewModel();
            s.Categories = Utils.StringToDictionaryIntString(Settings.Default.OnlineSupportList.ToString(), ",");
            s.OnlineSupports = db.OnlineSupports.ToList();
            return View(s);
        }

    }
}
